package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.IpassSchoolMapper;
import com.ruoyi.system.domain.IpassSchool;
import com.ruoyi.system.service.IIpassSchoolService;

/**
 * 一卡通校园配置Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-03-27
 */
@Service
public class IpassSchoolServiceImpl implements IIpassSchoolService 
{
    @Autowired
    private IpassSchoolMapper ipassSchoolMapper;

    /**
     * 查询一卡通校园配置
     * 
     * @param id 一卡通校园配置主键
     * @return 一卡通校园配置
     */
    @Override
    public IpassSchool selectIpassSchoolById(Long id)
    {
        return ipassSchoolMapper.selectIpassSchoolById(id);
    }

    /**
     * 查询一卡通校园配置列表
     * 
     * @param ipassSchool 一卡通校园配置
     * @return 一卡通校园配置
     */
    @Override
    public List<IpassSchool> selectIpassSchoolList(IpassSchool ipassSchool)
    {
        return ipassSchoolMapper.selectIpassSchoolList(ipassSchool);
    }

    /**
     * 新增一卡通校园配置
     * 
     * @param ipassSchool 一卡通校园配置
     * @return 结果
     */
    @Override
    public int insertIpassSchool(IpassSchool ipassSchool)
    {
        ipassSchool.setCreateTime(DateUtils.getNowDate());
        return ipassSchoolMapper.insertIpassSchool(ipassSchool);
    }

    /**
     * 修改一卡通校园配置
     * 
     * @param ipassSchool 一卡通校园配置
     * @return 结果
     */
    @Override
    public int updateIpassSchool(IpassSchool ipassSchool)
    {
        return ipassSchoolMapper.updateIpassSchool(ipassSchool);
    }

    /**
     * 批量删除一卡通校园配置
     * 
     * @param ids 需要删除的一卡通校园配置主键
     * @return 结果
     */
    @Override
    public int deleteIpassSchoolByIds(Long[] ids)
    {
        return ipassSchoolMapper.deleteIpassSchoolByIds(ids);
    }

    /**
     * 删除一卡通校园配置信息
     * 
     * @param id 一卡通校园配置主键
     * @return 结果
     */
    @Override
    public int deleteIpassSchoolById(Long id)
    {
        return ipassSchoolMapper.deleteIpassSchoolById(id);
    }
}
